/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entity;

/**
 *
 * @author Young Ran
 */
public class FitnessProgram {

    private int id;
    private String name;
    private int level;
    private String description;
    private int price;
    private float discount;

    public FitnessProgram() {
    }

    public FitnessProgram(int id, String name, int level, String description, int price, float discount) {
        this.id = id;
        this.name = name;
        this.level = level;
        this.description = description;
        this.price = price;
        this.discount = discount;
    }

    public int getId() {
        return id;
    }

    public String getName() {
        return name;
    }

    public int getLevel() {
        return level;
    }

    public String getDescription() {
        return description;
    }

    public int getPrice() {
        return price;
    }

    public float getDiscount() {
        return discount;
    }

    public void setId(int id) {
        this.id = id;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setLevel(int level) {
        this.level = level;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public void setDiscount(float discount) {
        this.discount = discount;
    }

    @Override
    public String toString() {
        String des;
        if (description.length() < 42-name.length()) {
            des = description;
        } else {
            des = description.substring(0, 42-name.length()) + "...";
        };
        return "<html><p style='padding:20px;'><font color='white'><b>" + level + " | " + name + "</b> | " + des + "</font></p></html>";
    }
}
